package com.consumer.service;

import com.dubbo.api.OrderService;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author zy
 * @version 1.0
 * @date 2024/6/16 17:40
 * @description
 **/
@Service
public class OrderServiceImpl implements OrderService {

    @Resource
    private RestTemplate restTemplate;


    public String getOrder() {
        String template = restTemplate.getForObject("http://localhost:8082/user", String.class);
        System.out.println("template = " + template);
        return template;
    }
}
